<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>

<h1>时间:{{time}}</h1>
</div>
<script src="../vue.js"></script>
<script>
    let v = new Vue({
        el:"div",
        data:{
            time:0
        }
    })
    setInterval(function () {
        /*修改Vue对象中的变量 页面会自动跟着改变*/
        v.time++;

    },1000)
</script>
</body>
</html>